package com.ysd.lis.controller.qc;

import com.ysd.common.Result;
import com.ysd.lis.request.qc.QcPageDto;
import com.ysd.lis.request.qc.QcResultChartParam;
import com.ysd.lis.service.qc.QcMaterialResultChartService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * @program: server_lis
 * @author: liuQi
 * @create: 2024-01-09 17:41
 */
@Api(tags = "质控图")
@RestController
@RequestMapping("/api/qc/chart")
public class QcMaterialResultChartController {

    @Autowired
    public QcMaterialResultChartService qcMaterialResultChartService;

    /**
     * 查询Z图与LJ图 统计图数据
     * @param qcResultChartParam
     * @return
     */
    @ApiOperation("查询Z图与LJ图 统计图数据")
    @GetMapping("/getResultChartData")
    public Result getResultChartData(QcResultChartParam qcResultChartParam) {
        return qcMaterialResultChartService.getResultChartData(qcResultChartParam);
    }

    /**
     * 查询Z图与LJ图 质控物数据
     * @param qcResultChartParam
     * @return
     */
    @ApiOperation("查询Z图与LJ图 质控物数据")
    @GetMapping("/getResultChartTable1")
    public Result getResultChartTable1(QcResultChartParam qcResultChartParam) {
        return qcMaterialResultChartService.getResultChartTable1(qcResultChartParam);
    }

    /**
     * 查询Z图与LJ图 质控结果数据
     * @param qcResultChartParam
     * @return
     */
    @ApiOperation("查询Z图与LJ图 质控结果数据")
    @GetMapping("/getResultChartTable2")
    public Result getResultChartTable2(QcPageDto qcResultChartParam) {
        return qcMaterialResultChartService.getResultChartTable2(qcResultChartParam);
    }

    /**
     * 查询 Grubbs 图表数据与统计图数据
     * @param qcResultChartParam
     * @return
     */
    @ApiOperation("查询 Grubbs 图表数据与统计图数据")
    @GetMapping("/getGrubbsData")
    public Result getGrubbsData(QcResultChartParam qcResultChartParam) {
        return qcMaterialResultChartService.getGrubbsData(qcResultChartParam);
    }

    /**
     * 查询 Monica 图表数据与统计图数据
     * @param qcResultChartParam
     * @return
     */
    @ApiOperation("查询 Monica 图表数据与统计图数据")
    @GetMapping("/getMonicaData")
    public Result getMonicaData(QcResultChartParam qcResultChartParam) {
        return qcMaterialResultChartService.getMonicaData(qcResultChartParam);
    }

    /**
     * 查询 Youden 图表数据
     * @param qcResultChartParam
     * @return
     */
    @ApiOperation("查询Youden图表数据")
    @GetMapping("/getYouDenData")
    public Result getYouDenData(QcResultChartParam qcResultChartParam) {
        return qcMaterialResultChartService.getYouDenData(qcResultChartParam);
    }

    /**
     * 查询 正态分布 图表数据
     * @param qcResultChartParam
     * @return
     */
    @ApiOperation("查询 正态分布 图表数据")
    @GetMapping("/getNormalDistributionData")
    public Result getNormalDistributionData(QcResultChartParam qcResultChartParam) {
        return qcMaterialResultChartService.getNormalDistributionData(qcResultChartParam);
    }

    /**
     * 查询 累计和控制图
     * @param qcResultChartParam
     * @return
     */
    @ApiOperation("查询 累计和控制图")
    @GetMapping("/getCusumData")
    public Result getCusumData(QcResultChartParam qcResultChartParam) {
        return qcMaterialResultChartService.getCusumData(qcResultChartParam);
    }


}
